package com.hongyi.excutService;

import java.util.concurrent.Callable;

/**
 * @Author: hongyi
 * @CreateTime: 2024-10-23
 */


public class ApiTask implements Callable<String> {
    private final String name;

    public ApiTask(String name) {
        this.name = name;
    }


    @Override
    public String call() throws Exception {
        StringBuilder builder = new StringBuilder();

        for (int i = 1; i <= 3; i++) {
            builder.append(name).append("处理任务").append(":").append(i).append("\n");
        }
        return builder.toString();
    }
}
